﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master"Inherits="System.Web.Mvc.ViewPage<TemplateWeb.Models.ViewModels.GroupViewModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	SelectSach
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent1" runat="server">
	<span class="AdminTitle" style="color:#cc0000;">Sach Management</span>
	(<a href="<%= Url.Action("Index", "Home") %>" class="AdminPageText">
	<%= WebConfiguration.SiteName  %>
	</a>|
	<a href="<%= Url.Action("LogOff", "Account") %>" class="AdminPageText">
		LogOut
	</a>)
	<br />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent2" runat="server">
	<script src="../../Scripts/fckeditor/fckeditor.js" type="text/javascript"></script>
	<script type="text/javascript">
		window.onload = function () {
			var objFckEditor = new FCKeditor('Sach_NoiDung');
			objFckEditor.BasePath = '<%= ResolveUrl("~/Scripts/fckeditor/")%>';
			objFckEditor.Height = 480;
			objFckEditor.Width = 600;
			objFckEditor.ToolbarSet = 'TemplateWeb.MyToolbar';
			objFckEditor.ReplaceTextarea();
		}
	</script>
	<script type="text/javascript">
		<% if (Model.SachModel.InfoText != null && Model.SachModel.InfoText != ""){ %>
			alert('<%= Model.SachModel.InfoText %>');
		<% } %>
	</script>
	<% using (Html.BeginForm("UpdateSach", "Admin", FormMethod.Post, new { enctype = "multipart/form-data", onsubmit = "return ValidateSach();" }))
	{ %>
		<input type="hidden" name="Sach_ID" value="<%= Model.SachModel.GetModel.LstObjModel[0].ID %>" />
		<input type="hidden" name="Sach_IDLoaiSach" value="<%= Model.SachModel.GetModel.LstObjModel[0].IDLoaiSach %>" />
		<div style="padding-top: 40px">
			<span style="font-size:18px; font-weight:bold;">DetailOf Sach</span>
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="AdminPageText">
				<tbody>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">TenSach: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<%= Html.TextBox("Sach_TenSach", Model.SachModel.GetModel.LstObjModel[0].TenSach, new { @style = "width: 590px;" })%>
							</div>
						</td>
					</tr>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">NoiDung: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<%= Html.TextArea("Sach_NoiDung", Model.SachModel.GetModel.LstObjModel[0].NoiDung)%>
							</div>
						</td>
					</tr>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">NoiDungRutGon: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<textarea name="Sach_NoiDungRutGon" style="width: 590px; height: 80px;"><%= Model.SachModel.GetModel.LstObjModel[0].NoiDungRutGon%></textarea>
							</div>
						</td>
					</tr>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">TacGia: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<%= Html.TextBox("Sach_TacGia", Model.SachModel.GetModel.LstObjModel[0].TacGia, new { @style = "width: 290px;" })%>
							</div>
						</td>
					</tr>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">Gia: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<%= Html.TextBox("Sach_Gia", String.Format("{0:#,##0;Nothing}", Model.SachModel.GetModel.LstObjModel[0].Gia), new { @style = "width: 190px;" })%> VNĐ
							</div>
						</td>
					</tr>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">SoTrang: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<%= Html.TextBox("Sach_SoTrang", Model.SachModel.GetModel.LstObjModel[0].SoTrang, new { @style = "width: 190px;" })%>
							</div>
						</td>
					</tr>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">NhaXuatBan: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<%= Html.TextBox("Sach_NhaXuatBan", Model.SachModel.GetModel.LstObjModel[0].NhaXuatBan, new { @style = "width: 290px;" })%>
							</div>
						</td>
					</tr>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">Khổ: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<%= Html.TextBox("Sach_Kho", Model.SachModel.GetModel.LstObjModel[0].Kho, new { @style = "width: 190px;" })%>
							</div>
						</td>
					</tr>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">HinhMinhHoa: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<input type="file" name="Sach_HinhMinhHoa" />
								<br />
								<br />
								<img src="../../Content/Images/Items/<%= Model.SachModel.GetModel.LstObjModel[0].HinhMinhHoa %>" width="120px" height="120px" />
							</div>
						</td>
					</tr>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">TieuBieu: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<%= Html.CheckBox("Sach_TieuBieu", Model.SachModel.GetModel.LstObjModel[0].TieuBieu.Value)%>
							</div>
						</td>
					</tr>
					<tr>
						<td>
							<div align="left" style="padding-top:15px">
								<font class="normal8">BestSeller: </font>
							</div>
						</td>
						<td height="20">
							<div align="left" style="padding-top:15px">
								<%= Html.CheckBox("Sach_BestSeller", Model.SachModel.GetModel.LstObjModel[0].BestSeller.Value)%>
							</div>
						</td>
					</tr>
					<tr>
						<td height="20" style="width: 130px">
						</td>
						<td height="20">
							<div align="left">
								<br/>
								<input type="submit" value="Update" />
								<p>
								</p>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
	<% } %>
</asp:Content>
